<?php
/**
 * @fileName:ShippableProduct.php
 * @project:miaosang
 * @author : 吐火青蛙
 * @user : 吐火青蛙
 * @date : 2020/4/10
 *
 */

namespace miaosang\basicknowledge\design\abstractfactory;
use miaosang\basicknowledge\design\abstractfactory\AbstractFactory;
class ShippableProduct implements AbstractFactory
{
    /**
     * @var float 产品价格
     */
    private $productPrice;
    /**
     * @var float 产品消费
     */
    private $productCosts;

    /**
     * ShippableProduct constructor.
     */
    public function __construct(float $productPrice,float $productCosts)
    {
        $this->productPrice = $productPrice;
        $this->productCosts = $productCosts;

    }

    /**
     * @return float
     */
    public function calcuationPrice(): float
    {
        return $this->productPrice + $this->productCosts;
        // TODO: Implement calcuationPrice() method.
    }
}
